home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
p_man
/
cat3
/
libelfutil
/
xlate_expand_reg_info.z
/
xlate_expand_reg_info
Wrap
Text File
|
1998-10-30
|
14KB
|
198 lines
XXXXLLLLAAAATTTTEEEE____EEEEXXXXPPPPAAAANNNNDDDD____RRRREEEEGGGG____IIIINNNNFFFFOOOO((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____EEEEXXXXPPPPAAAANNNNDDDD____RRRREEEEGGGG____IIIINNNNFFFFOOOO((((3333EEEE))))
NNNNAAAAMMMMEEEE
_xxxx_llll_aaaa_tttt_eeee______eeee_xxxx_pppp_aaaa_nnnn_dddd______rrrr_eeee_gggg______iiii_nnnn_ffff_oooo: _xxxx_llll_aaaa_tttt_eeee______eeee_xxxx_pppp_aaaa_nnnn_dddd______rrrr_eeee_gggg______iiii_nnnn_ffff_oooo_2222 - expand register
instructions
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_eeee_llll_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_eeee_llll_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_dddd_wwww_aaaa_rrrr_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_dddd_wwww_aaaa_rrrr_ffff_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_cccc_mmmm_pppp_llll_rrrr_ssss_////_xxxx_llll_aaaa_tttt_eeee_...._hhhh_>>>>
_####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_llll_iiii_bbbb_XXXX_llll_aaaa_tttt_eeee_...._hhhh_>>>>
_iiii_nnnn_tttt _xxxx_llll_aaaa_tttt_eeee______eeee_xxxx_pppp_aaaa_nnnn_dddd______rrrr_eeee_gggg______iiii_nnnn_ffff_oooo_((((_xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _cccc_oooo_nnnn______tttt_aaaa_bbbb_llll_eeee______pppp_tttt_rrrr_,,,,
_EEEE_llll_ffff_6666_4444______XXXX_wwww_oooo_rrrr_dddd _****_nnnn_uuuu_mmmm______iiii_nnnn_ssss_tttt_rrrr_ssss_,,,,
_xxxx_llll_aaaa_tttt_eeee______rrrr_eeee_gggg______iiii_nnnn_ssss_tttt_rrrr _****_****_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss
_))))_;;;;
_iiii_nnnn_tttt _xxxx_llll_aaaa_tttt_eeee______eeee_xxxx_pppp_aaaa_nnnn_dddd______rrrr_eeee_gggg______iiii_nnnn_ffff_oooo_2222_((((_xxxx_llll_aaaa_tttt_eeee______tttt_aaaa_bbbb_llll_eeee______cccc_oooo_nnnn _cccc_oooo_nnnn______tttt_aaaa_bbbb_llll_eeee______pppp_tttt_rrrr_,,,,
_EEEE_llll_ffff_6666_4444______XXXX_wwww_oooo_rrrr_dddd _****_nnnn_uuuu_mmmm______iiii_nnnn_ssss_tttt_rrrr_ssss_,,,,
_xxxx_llll_aaaa_tttt_eeee______rrrr_eeee_gggg______iiii_nnnn_ssss_tttt_rrrr_2222 _****_****_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss
_))))_;;;;
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
These are useful for programs like _e_l_f_d_u_m_p(1) to show the actual contents
of the register location expressions. These are otherwise very useful.
The functions and the values returned throught the pointers are identical
except that _x_l_a_t_e__r_e_g__i_n_s_t_r_2 has an extra field in the definition. The
extra field, _s_r__i_n_s_t_r__o_f_f_s_e_t, is the byte offset in the register
instruction stream of the first byte of the particular register
instruction.
Aside from the additional field in the structure the functions are
identical.
_x_l_a_t_e__r_e_g__i_n_s_t_r is now considered obsolete. Applications should cease
using it in favor of _x_l_a_t_e__r_e_g__i_n_s_t_r_2.
Applications desiring the fastest possible speed will want to call
_x_l_a_t_e__e_x_p_a_n_d__r_e_g__i_n_f_o_2 rather than _x_l_a_t_e__e_x_p_a_n_d__r_e_g__i_n_f_o as the former is
slightly faster (the latter is implemented by _m_a_l_l_o_cing another array and
copying portions of the _x_l_a_t_e__r_e_g__i_n_s_t_r_2 array and it is the malloc and
copying that slows _x_l_a_t_e__r_e_g__i_n_s_t_r down in this implementation).
The arguments of _x_l_a_t_e__e_x_p_a_n_d__r_e_g__i_n_f_o and _x_l_a_t_e__e_x_p_a_n_d__r_e_g__i_n_f_o_2 are:
_c_o_n__t_a_b_l_e__p_t_r
which must be a valid open handle on a translation section.
The following arguments are pointers thru which values are returned.
_n_u_m__i_n_s_t_r_s
The value is the number of elements in the iiiinnnnssssttttrrrruuuuccccttttiiiioooonnnnssss array.
PPPPaaaaggggeeee 1111
XXXXLLLLAAAATTTTEEEE____EEEEXXXXPPPPAAAANNNNDDDD____RRRREEEEGGGG____IIIINNNNFFFFOOOO((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____EEEEXXXXPPPPAAAANNNNDDDD____RRRREEEEGGGG____IIIINNNNFFFFOOOO((((3333EEEE))))
_i_n_s_t_r_u_c_t_i_o_n_s
The value is a pointer to an array of _x_l_a_t_e__r_e_g__i_n_s_t_r structs.
This array must be _f_r_e_e(2)d by the application to avoid memory
leakage.
See _x_l_a_t_e(4) for detailed information on the way each element of this
array is actually filled out. Each element of the array contains
_s_r__o_p which is an 8-bit op-code possibly ORd with data.
_s_r__v_a_l_1 Which is a 64-bit value whose meaning depends on _s_r__o_p .
_s_r__v_a_l_2 Which is a 64-bit value whose meaning depends on _s_r__o_p .
_s_r__i_n_s_t_r__o_f_f_s_e_t
appears only in the _x_l_a_t_e__r_e_g__i_n_s_t_r_2 version and is the byte
offset of the _s_r__o_p in the register instruction byte stream
(before unpacking the byte stream).
A sample use is:
_iiii_nnnn_tttt _rrrr_eeee_ssss_uuuu_llll_tttt_;;;;
_xxxx_llll_aaaa_tttt_eeee______rrrr_eeee_gggg______iiii_nnnn_ssss_tttt_rrrr_2222 _****_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_;;;;
_EEEE_llll_ffff_6666_4444______XXXX_wwww_oooo_rrrr_dddd _nnnn_uuuu_mmmm______iiii_nnnn_ssss_tttt_rrrr_ssss_;;;;
_rrrr_eeee_ssss_uuuu_llll_tttt _==== _xxxx_llll_aaaa_tttt_eeee______eeee_xxxx_pppp_aaaa_nnnn_dddd______rrrr_eeee_gggg______iiii_nnnn_ffff_oooo_2222_((((_cccc_oooo_nnnn______tttt_aaaa_bbbb_llll_eeee_,,,,
_&&&&_nnnn_uuuu_mmmm______iiii_nnnn_ssss_tttt_rrrr_ssss_,,,,
_&&&&_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_))))_;;;;
_ffff_oooo_rrrr_((((_iiii _==== _0000_;;;; _iiii _<<<< _nnnn_uuuu_mmmm______iiii_nnnn_ssss_tttt_rrrr_ssss_;;;; _++++_++++_iiii_))))
_{{{{
_pppp_rrrr_iiii_nnnn_tttt_ffff_((((_""""_%%%%_dddd _%%%%_llll_llll_dddd _%%%%_llll_llll_dddd _%%%%_llll_dddd_0000_,,,,
_((((_iiii_nnnn_tttt_))))_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_[[[[_iiii_]]]]_...._ssss_rrrr______oooo_pppp_,,,,
_((((_llll_oooo_nnnn_gggg _llll_oooo_nnnn_gggg_))))_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_[[[[_iiii_]]]]_...._ssss_rrrr______vvvv_aaaa_llll_1111_,,,,
_((((_llll_oooo_nnnn_gggg _llll_oooo_nnnn_gggg_))))_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_[[[[_iiii_]]]]_...._ssss_rrrr______vvvv_aaaa_llll_2222_,,,,
_((((_llll_oooo_nnnn_gggg_))))_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_[[[[_iiii_]]]]_...._ssss_rrrr______vvvv_aaaa_llll_2222_,,,,
_}}}}
_ffff_rrrr_eeee_eeee_((((_iiii_nnnn_ssss_tttt_rrrr_uuuu_cccc_tttt_iiii_oooo_nnnn_ssss_))))_;;;;
FFFFIIIILLLLEEEESSSS
/usr/include/libXlate.h
/usr/include/cmplrs/xlate.h
/usr/include/elf.h
/usr/include/dwarf.h
/usr/include/libdwarf.h
/usr/lib/libelfutil.a
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
Returns XLATE_TB_STATUS_NO_ERROR (0) on success. In case of error, a
negative number is returned indicating the error. In case of error,
nothing is returned thru the pointer arguments which would return values
on successful call (values might have been changed thru these pointers
but any such changes are not meaningful).
PPPPaaaaggggeeee 2222
XXXXLLLLAAAATTTTEEEE____EEEEXXXXPPPPAAAANNNNDDDD____RRRREEEEGGGG____IIIINNNNFFFFOOOO((((3333EEEE)))) XXXXLLLLAAAATTTTEEEE____EEEEXXXXPPPPAAAANNNNDDDD____RRRREEEEGGGG____IIIINNNNFFFFOOOO((((3333EEEE))))
_X_L_A_T_E__T_B__S_T_A_T_U_S__N_O__R_E_G__I_N_F_O
meaning that there is no register info available. Typically,
this means the translation was done by _c_o_r_d(1). This is really
not an error. It is a special status indicator applications need
to anticipate.
_X_L_A_T_E__T_B__S_T_A_T_U_S__I_N_V_A_L_I_D__T_A_B_L_E
means that the _t_a_b argument is not a valid open consumer table or
that the data pointed at has been corrupted by a _m_a_l_l_o_c arena
corruption.
_X_L_A_T_E__T_B__S_T_A_T_U_S__A_L_L_O_C__F_A_I_L
A call to _m_a_l_l_o_c() or _r_e_a_l_l_o_c() failed.
_X_L_A_T_E__T_B__S_T_A_T_U_S__B_A_D__R_E_G__V_A_L
means that the register number (somewhere in the table) is too
large to be used as an index into the Dwarf_Regtable array (see
<libdwarf.h>). This is either a memory corruption, a bogus
register area on the Elf xlate section, or an internal logic
error in the internals of this _l_i_b_e_l_f_u_t_i_l function. Should never
happen.
_X_L_A_T_E__T_B__S_T_A_T_U_S__B_A_D__F_R_A_M_E__O_P
means that the Dwarf frame op code is not one of the ones
expected. This is data corruption or an internal error in this
_l_i_b_e_l_f_u_t_i_l function. Should never happen.
_X_L_A_T_E__T_B__S_T_A_T_U_S__R_E_G__R_E_Q_U_E_S_T__B_O_G_U_S
This is an internal error in this _l_i_b_e_l_f_u_t_i_l function. Should
never happen.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
libelfutil(5), xlate(4), xlate_get_reg_rule(3e), xlate_init_fd(3e),
xlate_finish(3e), xlate_pro_init(3e), xlate_pro_finish(3e), DWARF
Debugging Information Format , A Consumer Library Interface to DWARF
PPPPaaaaggggeeee 3333